#!/usr/bin/python
# -*- coding: utf-8 -*-

class GenericFactory(object):    
    def create(self, s_module_name, s_type, d_parameters):
        # import the module
        module = __import__(s_module_name, globals(), locals(), [])
        # get the class
        clas = module.__dict__[s_type]
        # get the instance of the class        
        obj = clas(d_parameters)
        return obj

